#include<iostream>
#include<vector>
using namespace std;

vector<int> getRow(int n) {
	int i, sum;
	for (i = 1; i <= n; i++) {
		sum = (i + i * (i - 1)) * 2 - 1;
		if (sum > n)
			break;
	}
	return {i - 1, ((i - 1) + (i - 1) * (i - 2)) * 2 - 1};
}

int main() {
	int n;
	char ch;
	cin >> n >> ch;
	vector<int> v = getRow(n);
	int row = v[0];
	int ans = v[1];
	for (int i = 1; i <= row; i++) {
		int mx = 1 + (row - i) * 2;
		for (int j = 1; j < i; j++)
			cout << " ";
		for (int j = 1; j <= mx; j++)
			cout << ch;
		cout << endl;
	}
	for (int i = 2; i <= row; i++) {
		int mx = 1 + (i - 1) * 2;
		for (int j = 1; j <= row - i; j++)
			cout << " ";
		for (int j = 1; j <= mx; j++)
			cout << ch;
		cout << endl;
	}
	cout << n - ans;
	return 0;
}
